Techniques for Reducing Distractions in an Image

ABSTRACT

Techniques for reducing a distractor object in a first image are presented herein. A system can access a mask and the first image. A distractor object in the first image can be inside a region of interest and can have a pixel with an original attribute. Additionally, the system can process, using a machine-learned inpainting model, the first image and the mask to generate an inpainted image. The pixel of the distractor object in the inpainted image can have an inpainted attribute in chromaticity channels. Moreover, the system can determine a palette transform based on a comparison of the first image and the inpainted image. The transform attribute can be different from the inpainted attribute. Furthermore, the system can process the first image to generate a recolorized image. The pixel in the recolorized image can have a recolorized attribute based on the transform attribute of the palette transform.

FIELD

The present disclosure relates generally to reducing distractions in animage. More particularly, the present disclosure relates to techniquesfor harmonizing a distractor within an image while maintaining realismof the image.

BACKGROUND

An image (e.g., photograph, frame of a video) and other forms of imagedata often include a distraction that can capture the eye-gaze of auser. As one example, the distraction can correspond to a distractingobject (e.g., clutter in the background of a room, a bright color of onesection of a background object) that distracts from the main subject(e.g., main speaker participating in a video call). As another example,the unwanted distractor object can correspond to an unsightly object inan otherwise pristine portrait photograph of a user. Thus, distractorobjects can correspond to objects which grab a user's visual attentionaway from the main subject of the image.

In conventional systems, the distractor object can be removed from theimage. However, replacing the distractor object can be a challengingproblem. In some instances, it may not be possible to remove thedistractor from the image without distorting the image or making theimage look unrealistic. For example, if the distractor object is onesection of a background object (e.g., a chair) that is distracting(e.g., distracting color, bright color, distracting pattern), thedistractor object may not be easily removed without distorting thebackground object.

SUMMARY

Aspects and advantages of embodiments of the present disclosure will beset forth in part in the following description, or can be learned fromthe description, or can be learned through practice of the embodiments.

The present disclosure provides systems and methods for reducingsaliency (e.g., attention) of distractors in an image by using amachine-trained model to manipulate the colors of the distractors, whilemaintaining the structure and content of the distractors. For example,chromatic information of the distractor(s) can be manipulated (e.g., soas to reduce saliency) while luminance information can be maintained(e.g., so as to maintain visual structure). Distractors can be definedas the regions of an image that draw attention away from the mainsubjects and reduce the overall user experience. In some instances, theresulting effects can be achieved solely using a pretrained model withno additional user input.

One example aspect of the present disclosure is directed to acomputer-implemented method for reducing a distractor object in a firstimage. The method can include accessing, by one or more computingdevices, a mask and the first image having the distractor object. Themask can indicate a region of interest associated with the first image.The distractor object can be inside the region of interest and have oneor more pixels with an original attribute. The method can furtherinclude processing, using a machine-learned inpainting model, the firstimage and the mask to generate an inpainted image. The one or morepixels of the distractor object can have an inpainted attribute in oneor more chromaticity channels. Additionally, the method can includedetermining a palette transform based a comparison of the first imageand the inpainted image. The one or more pixels of the distractor objectcan have a transform attribute in the one or more chromaticity channels,where the transform attribute is different than the inpainted attribute.Furthermore, the method can include processing the first image togenerate a recolorized image. The one or more pixels of the distractorobject in the recolorized image can have a recolorized attribute basedon the transform attribute and the determined palette transform.

Another example aspect of the present disclosure is directed to acomputing system, comprising one or more processors and one or morenon-transitory computer-readable media. The one or more non-transitorycomputer-readable media can collectively store a machine-learnedinpainting model and instructions that, when executed by the one or moreprocessors, cause the computing system to perform operations. Themachine-learned inpainting model can be configured to generate aninpainted image using a first image. The operations can includeaccessing a mask and the first image having the distractor object. Themask can indicate a region of interest associated with the first image.The distractor object can be inside the region of interest and have oneor more pixels with an original attribute. Additionally, the operationscan include processing, using the machine-learned inpainting model, thefirst image and the mask to generate an inpainted image. The one or morepixels of the distractor object can have an inpainted attribute in oneor more chromaticity channels. Moreover, the operations can includedetermining a palette transform based a comparison of the first imageand the inpainted image. The one or more pixels of the distractor objectcan have a transform attribute in the one or more chromaticity channels.The transform attribute can be different than the inpainted attribute.Furthermore, the operations can include processing the first image togenerate a recolorized image. The one or more pixels of the distractorobject in the recolorized image can have a recolorized attribute basedon the transform attribute and the determined palette transform.

Yet another example aspect of the present disclosure is directed to oneor more non-transitory computer-readable media that collectively store amachine-learned inpainting model. The machine-learned inpainting modelcan be learned by performance of operations. The operations can includeaccessing a mask and the first image having the distractor object. Themask can indicate a region of interest associated with the first image,and the distractor object can be inside the region of interest with oneor more pixels having an original attribute. Additionally, theoperations can include processing, using the machine-learned inpaintingmodel, the first image and the mask to generate an inpainted image. Theone or more pixels of the distractor object can have an inpaintedattribute in one or more chromaticity channels. Moreover, the operationscan include determining a palette transform based a comparison of thefirst image and the inpainted image. The one or more pixels of thedistractor object can have a transform attribute in the one or morechromaticity channels, and the transform attribute can be different thanthe inpainted attribute. Furthermore, the operations can includeprocessing the first image to generate a recolorized image. The one ormore pixels of the distractor object in the recolorized image can have arecolorized attribute based on the transform attribute and thedetermined palette transform.

In some instances, the processing the first image to generate theinpainted image described in the method can include processing the firstimage and the mask to generate a masked image. The masked image can beinputted into the machine-learned inpainting model to generate theinpainted image. Additionally, the recolorized attribute determined inthe method described herein can be different than the inpaintedattribute.

In some instances, the one or more chromaticity channels can include hueand saturation (HS) channels. Additionally, a value attribute for eachpixel in the original image, the inpainted image, and the recolorizedimage can be kept constant.

In some instances, the recolorized attribute can be different from theinpainted attribute.

In some instances, the palette transform can be generated throughperformance of a voting technique. For example, the palette transformcan be a machine-learned model having a voting classifier. Themachine-learned model can be based on majority voting, plurality voting,weighted voting, simple averaging, weighted averaging, and so on.

In some instances, the distractor object can include a plurality ofpixels with the original attribute. The one or more pixels of thedistractor object can be determined to have the transform attributebased on a plurality voting technique. In other instance, thedetermination of the transform attribute can be based on majorityvoting, weighted voting, simple averaging, weighted averaging, or othervoting techniques.

In some instances, the palette transform can be further determined basedon a dilated mask. The dilated mask can have an expanded region ofinterest associated with the first image. The expanded region ofinterest of the dilated mask being larger than the region of interest ofthe mask.

In some instances, the machine-learned inpainting model is trained usingin one or more chromaticity channels training data. For example, themachine-learned inpainting model can be trained using hue and saturation(HS) training data.

In some instances, the method can further include accessing a raw image.The raw image can be in a red-green-blue (RGB) color space. The methodcan further include processing the raw image to generate the firstimage. For example, the first image can be in a hue-saturation (HS)channels, and a value attribute for each pixel in the first image can bekept constant when the raw image is processed to generate the firstimage. Additionally, the raw image can be a high-resolution image (e.g.,greater than 300 dots per inch (DPI)), and a version of the first imagethat is processed by the machine-learned inpainting model is alow-resolution image (e.g., less than 300 DPI). This is an example of animproved technical effect because of faster processing time for theinpainting model, because the inpainting model can process thelow-resolution image.

In some instances, the recolorized image can also be in the HS channels.Moreover, the method can further include processing the recolorizedimage to generate a final image. The final image can be in ared-green-blue (RGB) color space. Furthermore, the recolorized image canbe a high-resolution image, and the inpainted image is low-resolutionimage. This is another example of an improved technical effect byallowing faster processing time (e.g., by processing a low-resolutionimage) without reducing the image quality

Other aspects of the present disclosure are directed to various systems,apparatuses, non-transitory computer-readable media, user interfaces,and electronic devices.

These and other features, aspects, and advantages of various embodimentsof the present disclosure will become better understood with referenceto the following description and appended claims. The accompanyingdrawings, which are incorporated in and constitute a part of thisspecification, illustrate example embodiments of the present disclosureand, together with the description, serve to explain the relatedprinciples.

BRIEF DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed incolor. Copies of this patent or patent application publication withcolor drawing(s) will be provided by the Office upon request and paymentof the necessary fee.

Detailed discussion of embodiments directed to one of ordinary skill inthe art is set forth in the specification, which makes reference to theappended figures, in which:

FIG. 1A depicts a block diagram of an example computing system accordingto example embodiments of the present disclosure.

FIG. 1B depicts a block diagram of an example computing device accordingto example embodiments of the present disclosure.

FIG. 1C depicts a block diagram of an example computing device accordingto example embodiments of the present disclosure.

FIG. 2 depicts a flow diagram of an example technique for reducing adistractor object in an image according to example embodiments of thepresent disclosure.

FIG. 3A depicts an illustration of a hue-saturation-value (HSV)transform technique according to example embodiments of the presentdisclosure.

FIG. 3B depicts an illustration of a HSV space projections techniqueaccording to example embodiments of the present disclosure.

FIG. 3C depicts an illustration of inpainting technique in thehue-saturation channels according to example embodiments of the presentdisclosure.

FIG. 4 depicts a diagram of determining a palette transform using avoting technique according to example embodiments of the presentdisclosure.

FIG. 5 depicts a flow chart of an example method for reducing adistraction from an image according to example embodiments of thepresent disclosure.

FIG. 6 depicts a flow chart of another example method for reducing adistraction from an image according to example embodiments of thepresent disclosure.

FIG. 7 depicts an illustration of transforming an original image into aninpainted image and a recolorized image according to example embodimentsof the present disclosure.

FIG. 8 depicts another illustration of transforming an original imageinto a recolorized image according to example embodiments of the presentdisclosure.

FIG. 9 depicts another illustration of transforming an original imageinto a recolorized image according to example embodiments of the presentdisclosure.

Reference numerals that are repeated across plural figures are intendedto identify the same features in various implementations.

DETAILED DESCRIPTION

Generally, the present disclosure is directed to systems and methodsthat use the outputs of one or more machine learning models (e.g., oneor more inpainting models) to generate a palette transform that can beused to modify an image to reduce distractions. In some implementations,as described herein, the image can be modified to harmonize (e.g.,camouflage) a distractor object with the background of the image whilemaintaining realism of the image. For example, different sections of thedistractor object in the image can be recolorized to harmonize with thebackground of the image. In particular, the palette transform can beused to modify the chromatic information of the distractor(s) (e.g., soas to reduce saliency) while the luminance information associated withthe distractor(s) can be maintained or left unmodified (e.g., so as tomaintain visual structure).

In particular, in some example implementations, inpainting outputsprovided by a machine-learned inpainting model can be leveraged togenerate a palette transform that can be used to recolor an input image.Specifically, an input image can be obtained that includes a distractorobject. A mask can indicate the location of the distractor object. Themask can be applied to the input image to obtain a masked image in whichthe distractor object has been masked out. The masked image can beprocessed using the machine-learned inpainting model to generate aninpainted image. The inpainted image can have inpainted attributes(e.g., color values) at the masked locations. A palette transform can bedetermined by comparing the input image with the inpainted image. Forexample, determining the palette transform can include performing avoting technique in which, for each pixel included in a voting region,the pixel's color in the input image is mapped to and votes for thecolor in the inpainted image at the corresponding pixel location. Insome implementations, according to an aspect of the present disclosure,the palette transform is generated only for the chromaticity channels ofa color space (e.g., hue and saturation channels in an HSV color space).The palette transform can then be applied to at least the portion of theinput image that contains the distractor to recolorize the distractor.Because, in some implementations, the palette transform operates tochange only chromaticity information, the distractor can be modified sothat its saliency is reduced while its visual structure is maintained.Further, because the output image is generated by applying the palettetransform to the input image (e.g., as opposed to providing theinpainted image as output), artefacts or other distortions introduced bya typical inpainting model can be avoided. Instead, the inpainting modelis simply used to facilitate generation of the palette transform.

More particularly, conventional techniques (e.g., style transfer, colorharmonization, image camouflage, saliency driven image manipulation)have been used to tackle related problems, but none of the conventionaltechniques can properly maintain the realism of the image. Inparticular, certain conventional techniques can be used to edit an imageto remove a distractor object from the background of the image. However,removing the distractor object using conventional techniques may not beideal in certain situations, such as when the structure of the object isneeded to be maintained. In contrast, the techniques described in someembodiments of the present disclosure can reduce the attentionassociated with a distractor object, while maintaining realism in theimage (e.g., while maintaining the visual structure of the distractorobject).

In some instances, the realism of the image can be maintained when adistractor object in the background is not removed, but instead thedistracting colors of the distractor object are recolorized (e.g.,modified). The structure of an object (e.g., chair with multiplepatterns) can be maintained, while the system changes the distractingcolors or pattern in the object (e.g., a distractor color in a sectionof the chair, a distractor pattern within the multiple patterns of thechair) to a color or pattern that is more similar to the background. Bychanging the distracting component (e.g., color, pattern) to a color orpattern similar to the background, the distracting component can blend(e.g., camouflage) in with the background, which can result in thereduction of the attention associated with the distracting component.For example, strong or discordant background colors may be distracting,and the system can harmonize the strong background colors with the morecommonly appearing background colors of the image to reduce distraction.

According to an aspect of the present disclosure, certain portions ofthe techniques described herein can be performed on fewer than all ofthe channels included in a color space. As an example, in someimplementations, at least the palette transformation can be generatedfor and applied in only the chromaticity channels of a color space whilethe luminance channel(s) can be unaltered. Thus, in one example, a rawimage can be provided in a first color space (e.g., RGB) and can beconverted to a second color space (e.g., HSV) that contains bothchromaticity and luminance channels. The remainder of the process (e.g.,including masking, inpainting, palette transform generation, and palettetransform application) can then be performed with respect to only thechromaticity channels (e.g., the HS channels, but not the V channel inan HSV color space). The recolorized image can then be optionallytransformed back into the first color space (e.g., RGB), if desired.

In other implementations, fewer portions of the process can be performedonly with respect to the chromaticity channels. As one example, in someimplementations, an input RGB image can be masked and inpainting can beperformed in the RGB space. Next, the input RGB image and the inpaintedRGB image can be converted to the alternative color space (e.g., HSV)and the palette transform can be generated for the chromaticity channels(but not the luminance channel(s)). The palette transform can be appliedto the converted (e.g., HSV) input image to generate the recolorizedimage in the second color space (e.g., HSV). Again, the recolorizedimage can optionally be transformed back to RGB if desired. Thisalternative approach can enable the process to leverage an inpaintingmodel that operates in RGB space, as such an inpainting model may bemore commonly available.

According to another aspect of the present disclosure, certain portionsof the techniques described herein can be performed on imagery having arelatively lower resolution while other portions can be performed onimagery having a relatively higher resolution. For example, theprocessing of the masked image with the inpainting model can beperformed on lower resolution imagery. The palette transform can begenerated from such lower resolution processing. Because only colortransformation information is extracted from the inpainting process, theresolution of the inpainting output is of less importance. Then, thepalette transform can be applied to the input image in the higherresolution. In such fashion, computational savings can be achieved byperforming certain actions in lower resolution while maintaining theability to achieve higher resolution recolorized outputs.

The systems and methods of the present disclosure provide severaltechnical effects and benefits. Aspects of the present disclosure canprovide several technical improvements to machine-learning training forimage processing and editing, image processing technology, and imageediting technology. As an example, to help improve the realism of animage when a distraction is reduced, the image editing technology of thepresent disclosure can maintain the structure of distracting objectswhile reducing the distraction within the image. Additionally, the imageediting technology is improved at least in part based on machine-learnedinpainting model and the palette transform. The palette transform can begenerated by applying a voting technique to the outputs of themachine-learned inpainting model. In some implementations, themachine-learned inpainting model can be trained and run usinglow-resolution image data. In some instances, the image data can includedata in one or more chromaticity channels. By training and/or runningthe models on or using low-resolution images, the computationalresources (e.g., processor time, memory usage, etc.) to train and/or runthe models can be reduced.

Systems and methods described herein can improve the processing speed ofthe image processing and also reduce the computing resources needed toperform the image processing. The techniques described in the presentdisclosure describe processes for transforming high-resolution images tolow-resolution images in order to process the low-resolution imageswithout losing the image quality of the final images that have beenmodified. By allowing for the image processing (e.g., the inpaintingportion of the process) to be done on low-resolution images, theprocessing time is reduced, and the computing resources required for theprocessing is reduced. As a result, the system can achievestate-of-the-art performance while maintaining a high level of imagequality. Thus, the performed image editing can be higher quality (e.g.,more accurate) than previous techniques, which represents an improvementin the performance of a computing system.

The use of low-resolution images, that has been transformed fromhigh-resolution images, also removes some confusion from the tuning andmakes the tuning more efficient, thereby conserving computing resources.The trained system may reduce the amount of computing resources utilizedversus previous systems. In particular, certain less efficientapproaches to image editing may attempt to learn to mimic human edits ina supervised fashion. Instead, the present disclosure leverages accessto a pre-trained model to drive generation of a palette transform thatis then applied to effectuate the image editing process.

Additionally, the proposed approaches may eliminate the need to createor perform multiple different edits on an image to achieve a desiredeffect. For example, certain existing techniques may require trial anderror using a number of different stock editing operations until adesired result is achieved. The systems and methods can instead directlyuse a machine-learned model that achieves the desired effect. Byreducing the number of editing operations that need to be performed, thesystems and methods of the present disclosure can result in savings ofcomputing resources such as processor usage, memory usage, and/ornetwork bandwidth usage.

Moreover, using the techniques described herein, the system candemonstrate better performance over existing methods using internalreal-world image data. The proposed approaches can reduce distractionsin an image, while maintaining the realism of the image, in lessprocessing time and with less computing resources than existing methods.This, in turn, improves the functioning of cameras, image recordingdevices, video recording devices, image processing devices, and otherimage-related devices.

Furthermore, systems and methods of the present disclosure may utilizemachine learning technology to improve the editing of an image to removea distraction from the image. Specifically, example systems and methodsof the present disclosure can leverage using a model processinglow-resolution images to train the system to successfully reduce adistraction within a region of interest.

As the implementation of machine learning also eliminates the need tomanually edit every occurrence of a distraction in an image, moreefficiency may be added. The system may also eliminate the need for acoder to write a complicated code, run the code, refine the code, andcontinually supervise performance.

In some implementations, the models can be trained or have beenpre-trained based on eye-gaze data. The eye-gaze data can include thelocation of an image that is being viewed by a user, which can be usedto determine human visual attention. For example, the mask can beautomatically generated by the system using eye-gaze data.

Additionally, techniques described herein allows for editing images todecrease human attention for the purpose of reducing visual distraction,but also increasing human attention to a main subject. For example, thesystem leverages machine-learned models to drive drastic, but stillrealistic, edits, which can significantly change an observer's attentionto different regions in the image. This capability can have importantapplications, such as photography, where pictures often contain objectsthat distract from the main subject(s) we want to portray, or in videoconferencing, where clutter in the background of a room or an office maydistract from the main speaker participating in the call.

Techniques described herein demonstrate how image editing processes canbe guided by the knowledge of visual attention embedded within themachine-learned models. User studies of the implemented image editingmodel show that the produced image edits: a) effectively reduce thevisual attention drawn to the specified regions, b) maintain well theoverall realism of the images, and c) are significantly more preferredby users over other existing editing effects.

With reference now to the Figures, example embodiments of the presentdisclosure will be discussed in further detail.

Example Devices and Systems

FIG. 1A depicts a block diagram of an example computing system 100 thatperforms image editing according to example embodiments of the presentdisclosure. The system 100 includes a user computing device 102, aserver computing system 130, and a training computing system 150 thatare communicatively coupled over a network 180.

The user computing device 102 can be any type of computing device, suchas, for example, a personal computing device (e.g., laptop or desktop),a mobile computing device (e.g., smartphone or tablet), a gaming consoleor controller, a wearable computing device, an embedded computingdevice, or any other type of computing device.

The user computing device 102 includes one or more processors 112 and amemory 114. The one or more processors 112 can be any suitableprocessing device (e.g., a processor core, a microprocessor, an ASIC, aFPGA, a controller, a microcontroller, etc.) and can be one processor ora plurality of processors that are operatively connected. The memory 114can include one or more non-transitory computer-readable storagemediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magneticdisks, etc., and combinations thereof. The memory 114 can store data 116and instructions 118 which are executed by the processor 112 to causethe user computing device 102 to perform operations.

In some implementations, the user computing device 102 can store orinclude one or more models 120. For example, the models 120 (e.g.,inpainting model) can be or can otherwise include variousmachine-learned models such as neural networks (e.g., deep neuralnetworks) or other types of machine-learned models, including non-linearmodels and/or linear models. Neural networks can include feed-forwardneural networks, recurrent neural networks (e.g., long short-term memoryrecurrent neural networks), convolutional neural networks or other formsof neural networks. In other examples, the models 120 can be specificimage editing models which are differentiable, and which have beenparameterized to facilitate application of machine learning techniques.Example models 120 are discussed with reference to FIGS. 2-6 .

In some implementations, the one or more models 120 can be received fromthe server computing system 130 over network 180, stored in the usercomputing device memory 114, and then used or otherwise implemented bythe one or more processors 112. In some implementations, the usercomputing device 102 can implement multiple parallel instances of asingle model 120.

More particularly, the models 120 can be trained using a trainingcomputing system 150 with a set of training data 162 to train theparameters of the model to optimize the model. The training computingsystem 162 may rely on eye-gaze data to add efficiency and precision tothe training module. Training data may also include the creation oflow-resolution processed image data from high-resolution raw image data.Masks may also be used in training to provide a region of interest or amarker for the size and location of the unwanted data. In someinstances, the mask can be inputted using a user input component 122 orautomatically determined based on eye gaze data. In some instances, ifthe user has provided consent, the eye gaze data can be real-time datareceived from the user computing device 102.

Additionally, or alternatively, one or more models 140 can be includedin or otherwise stored and implemented by the server computing system130 that communicates with the user computing device 102 according to aclient-server relationship. For example, the models 140 can beimplemented by the server computing system 140 as a portion of a webservice (e.g., an image editing service). Thus, one or more models 120can be stored and implemented at the user computing device 102 and/orone or more models 140 can be stored and implemented at the servercomputing system 130.

The user computing device 102 can also include one or more user inputcomponent 122 that receives user input. For example, the user inputcomponent 122 can be a touch-sensitive component (e.g., atouch-sensitive display screen or a touch pad) that is sensitive to thetouch of a user input object (e.g., a finger or a stylus). Thetouch-sensitive component can serve to implement a virtual keyboard.Other example user input components include a microphone, a traditionalkeyboard, or other means by which a user can provide user input.

The server computing system 130 includes one or more processors 132 anda memory 134. The one or more processors 132 can be any suitableprocessing device (e.g., a processor core, a microprocessor, an ASIC, aFPGA, a controller, a microcontroller, etc.) and can be one processor ora plurality of processors that are operatively connected. The memory 134can include one or more non-transitory computer-readable storagemediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magneticdisks, etc., and combinations thereof. The memory 134 can store data 136and instructions 138 which are executed by the processor 132 to causethe server computing system 130 to perform operations.

In some implementations, the server computing system 130 includes or isotherwise implemented by one or more server computing devices. Ininstances in which the server computing system 130 includes pluralserver computing devices, such server computing devices can operateaccording to sequential computing architectures, parallel computingarchitectures, or some combination thereof.

As described above, the server computing system 130 can store orotherwise include one or more machine-learned models 140. For example,the models 140 can be or can otherwise include various machine-learnedmodels. Example machine-learned models include neural networks or othermulti-layer non-linear models. Example neural networks include feedforward neural networks, deep neural networks, recurrent neuralnetworks, and convolutional neural networks. Example models 140 arediscussed with reference to FIGS. 2-6 .

The user computing device 102 and/or the server computing system 130 cantrain the models 120 and/or 140 via interaction with the trainingcomputing system 150 that is communicatively coupled over the network180. The training computing system 150 can be separate from the servercomputing system 130 or can be a portion of the server computing system130.

The training computing system 150 includes one or more processors 152and a memory 154. The one or more processors 152 can be any suitableprocessing device (e.g., a processor core, a microprocessor, an ASIC, aFPGA, a controller, a microcontroller, etc.) and can be one processor ora plurality of processors that are operatively connected. The memory 154can include one or more non-transitory computer-readable storagemediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magneticdisks, etc., and combinations thereof. The memory 154 can store data 156and instructions 158 which are executed by the processor 152 to causethe training computing system 150 to perform operations. In someimplementations, the training computing system 150 includes or isotherwise implemented by one or more server computing devices.

The training computing system 150 can include a model trainer 160 thattrains the machine-learned models 120 and/or 140 stored at the usercomputing device 102 and/or the server computing system 130 usingvarious training or learning techniques, such as, for example, backwardspropagation of errors. For example, a loss function can bebackpropagated through the model(s) to update one or more parameters ofthe model(s) (e.g., based on a gradient of the loss function). Variousloss functions can be used such as mean squared error, likelihood loss,cross entropy loss, hinge loss, and/or various other loss functions.Gradient descent techniques can be used to iteratively update theparameters over a number of training iterations.

In some implementations, performing backwards propagation of errors caninclude performing truncated backpropagation through time. The modeltrainer 160 can perform a number of generalization techniques (e.g.,weight decays, dropouts, etc.) to improve the generalization capabilityof the models being trained.

In particular, the model trainer 160 can train the image editing models120 and/or 140 based on a set of training data 162. The training data162 can include, for example, a set of raw image data, a set ofprocessed image data, and a set of masks to indicate the region ofinterest, a set of inpainted image data, and a set of recolorized imagedata.

In some implementations, if the user has provided consent, the trainingexamples can be provided by the user computing device 102. Thus, in suchimplementations, the model 120 provided to the user computing device 102can be trained by the training computing system 150 on user-specificdata received from the user computing device 102. In some instances,this process can be referred to as personalizing the model.

The model trainer 160 includes computer logic utilized to providedesired functionality. The model trainer 160 can be implemented inhardware, firmware, and/or software controlling a general-purposeprocessor. For example, in some implementations, the model trainer 160includes program files stored on a storage device, loaded into a memory,and executed by one or more processors. In other implementations, themodel trainer 160 includes one or more sets of computer-executableinstructions that are stored in a tangible computer-readable storagemedium such as RAM hard disk or optical or magnetic media.

The network 180 can be any type of communications network, such as alocal area network (e.g., intranet), wide area network (e.g., Internet),or some combination thereof and can include any number of wired orwireless links. In general, communication over the network 180 can becarried via any type of wired and/or wireless connection, using a widevariety of communication protocols (e.g., TCP/IP, HTTP, SMTP, FTP),encodings or formats (e.g., HTML, XML), and/or protection schemes (e.g.,VPN, secure HTTP, SSL).

FIG. 1A illustrates one example computing system that can be used toimplement the present disclosure. Other computing systems can be used aswell. For example, in some implementations, the user computing device102 can include the model trainer 160 and the training dataset 162. Insuch implementations, the models 120 can be both trained and usedlocally at the user computing device 102. In some of suchimplementations, the user computing device 102 can implement the modeltrainer 160 to personalize the models 120 based on user-specific data.

FIG. 1B depicts a block diagram of an example computing device 10 thatperforms according to example embodiments of the present disclosure. Thecomputing device 10 can be a user computing device or a server computingdevice.

The computing device 10 includes a number of applications (e.g.,applications 1 through N). Each application contains its own machinelearning library and machine-learned model(s). For example, eachapplication can include a machine-learned model. Example applicationsinclude a text messaging application, an email application, a dictationapplication, a virtual keyboard application, a browser application, etc.

As illustrated in FIG. 1B, each application can communicate with anumber of other components of the computing device, such as, forexample, one or more sensors, a context manager, a device statecomponent, and/or additional components. In some implementations, eachapplication can communicate with each device component using an API(e.g., a public API). In some implementations, the API used by eachapplication is specific to that application.

FIG. 1C depicts a block diagram of an example computing device 50 thatperforms according to example embodiments of the present disclosure. Thecomputing device 50 can be a user computing device or a server computingdevice.

The computing device 50 includes a number of applications (e.g.,applications 1 through N). Each application is in communication with acentral intelligence layer. Example applications include a textmessaging application, an email application, a dictation application, avirtual keyboard application, a browser application, etc. In someimplementations, each application can communicate with the centralintelligence layer (and model(s) stored therein) using an API (e.g., acommon API across all applications).

The central intelligence layer includes a number of machine-learnedmodels. For example, as illustrated in FIG. 1C, a respectivemachine-learned model (e.g., a model) can be provided for eachapplication and managed by the central intelligence layer. In otherimplementations, two or more applications can share a singlemachine-learned model. For example, in some implementations, the centralintelligence layer can provide a single model (e.g., a single model) forall of the applications. In some implementations, the centralintelligence layer is included within or otherwise implemented by anoperating system of the computing device 50.

The central intelligence layer can communicate with a central devicedata layer. The central device data layer can be a centralizedrepository of data for the computing device 50. As illustrated in FIG.1C, the central device data layer can communicate with a number of othercomponents of the computing device, such as, for example, one or moresensors, a context manager, a device state component, and/or additionalcomponents. In some implementations, the central device data layer cancommunicate with each device component using an API (e.g., a privateAPI).

Example Model Arrangements

FIG. 2 depicts a flow diagram of an example technique 200 for reducing adistractor object in an image, according to example embodiments of thepresent disclosure. In some implementations, the computing system (usercomputing device 102, server computing device 130, training computingdevice 150, computing device 10, computing device 50) can process anoriginal image to reduce the distractor from the image using the exampletechnique 200 described in FIG. 2 .

The computing system can access (e.g., obtain, receive) an originalimage having a distractor 202 and a mask 203. In some instances, themask 203 can be determined by a machine-learned model 140 of the servercomputing system 130 (e.g., by using a segmentation model thatdetermines the boundary of the distractor object) or the mask can beobtained by the user input component 122 of the user computing device102. For example, a user can input, using the user input component 122,the mask 203 having a region of interest associated with the distractorobject, and for the distractor object within the region of interest tobe reduced from the image. A masked image 206 can be generated by thecomputing system using a masking technique 204, by processing the mask203 and the image having the distractor 202.

Additionally, the masked image 206 can be inputted into an inpaintingmodel 208 to generate an inpainted image 212. In some implementations,the masked image 206 can be a lower resolution than the original imagehaving the distractor 202, which can result in faster processing time bythe inpainting model 208. The inpainting model 208 can have beenpreviously trained using training data 210. In some instances, theinpainted image 212 can be generated in the hue-saturation (HS) channelsof the hue-saturation-value (HSV) color space. When the inpainted image212 is generated in the HS channels, the inpainting model 208 can betrained using HS training data 210. By only using two chromaticitychannels (e.g., HS), and keeping the luminance channel (e.g., value)constant, the processing to generate the inpainted image is faster, andthe training of the inpainted model is more efficient. Additionally, bykeeping the value channel constant, the structure of the original imageis unaltered, which results in a final image that maintains its realism.FIGS. 3A-3C further describe techniques for inpainting.

In some implementations, a raw image or the original image can be in thered-green-blue (RGB) color space. Similar to RGB, hue-saturation-value(HSV) is another example of a color space. In some instances, the rawimage, which can be in the RGB color space, can be processed into theoriginal image, which can be in the HSV color space. The hue,saturation, and value are channels in the HSV color space. The hue andthe saturation are chromaticity channels in the HSV spaces. Each pixelin an image can have an attribute (e.g., numerical value) for eachchannel in the color space of the image. HSV color space can also beknown as a hue-saturation-lightness (HSL) color space and ahue-saturation-brightness (HSB) color space. In these alternate colorspaces, instead of keeping the value channel constant, the lightnesschannel in the HSL color space or the brightness channel in the HSBcolor space can be kept constant. Additionally, by using ahue-saturation (HS) rectangular grid, the techniques described hereincan mitigate quantization via smoothing the color transfer. For example,by working on a rectangular grid in HS space, each HS cell can havewell-defined adjacent cells in both directions. This is an example of atechnical benefit for mitigating quantization by smoothing the colortransfer.

Subsequently, technique 200 can continue with the computing systemdetermining a palette transform 216 using a voting technique 214. Insome implementations, the voting technique 214 can be performed on(e.g., limited to) an area of the inpainted image 212 that is inside adilated mask. The dilated mask can have an enlarged region of interestthan the region of interest for the mask 203. For example, the dilatedmask can be generated by dilating the mask 203 to include within themasked region additional pixels surrounding a perimeter of the originalmasked region. One of the benefits of the techniques described herein isthat the mask 203 does not have to be highly accurate for the process tostill function correctly. The techniques described herein can reduce thedistractor from the image even when the mask is inaccurate. FIG. 4further describes techniques for determining a palette transform using avoting technique. Likewise, using the dilated mask for the votingtechnique 214 can enable surrounding information to be included in thevoting technique 214 which can enable improved palette transformresults.

Once the palette transform 216 is determined, a recolorized image 220can be generated using the original image 202 by applying the palettetransform 218. The original image 202 can be a high-resolution image andthe recolorized image 220 can also be a high-resolution image. By doingthe voting technique 214 on the inpainted image, which can be alow-resolution image, the techniques allow for more efficient processingwhile maintaining the quality/resolution of the original image for therecolorized output. FIG. 4 further describes techniques for determininga palette transform using a voting technique.

FIG. 3A depicts an illustration 300 of a HSV transform technique,according to example embodiments of the present disclosure. In someimplementations, the computing system (user computing device 102, servercomputing device 130, training computing device 150, computing device10, computing device 50) can process an original image to generate aprocessed image using the HSV transform techniques described in FIG. 3A.In some instances, the computing system can transform the specifiedattribute(s) in the HSV space of one or more pixels in the originalimage within the masked area to be similar (e.g., equal) to theattribute(s) of the pixels outside the mask.

The techniques include transforming the original image 302 using a mask310 by: only changing the hue channel in the hue image 304; onlychanging the saturation channel in the saturation image 306; onlychanging the value channel in the value image 308; changing the hue andsaturation channels in the hue-sat image 312; changing the saturationand value channels in the sat-value image 314; changing the hue andvalue channels in the hue-value image 316; and changing the HSV channelsin the HSV image 318.

In some embodiments, the computing system (user computing device 102,server computing device 130) can adapt colors of the background of theimage to reduce the distraction. In conventional systems, RGB can be acommon method for representing colors and objects in an image. However,as described in techniques in the present disclosure, HSV can also be amethod for representing the colors and objects in an image. In someinstances, HSV can be a better method for reducing the distractor whilemaintaining the realism of the image. As illustrated in the hue image302, when only the hue of the flower is changed (e.g., average of thehue), the flower is still bright, but a green color. When the saturationis changed in the saturation image 306, the purple gets darker. When thevalue attribute is changed in the value image 308, the flower becomesgrey and almost camouflages with the image. When all three components(HSV) are changed in the HSV image 318, the camouflaging of the floweris better than the camouflaging of any of the other images.

FIG. 3B depicts an illustration 320 of a HSV space projectionstechnique, according to example embodiments of the present disclosure.In some implementations, the computing system (user computing device102, server computing device 130, training computing device 150,computing device 10, computing device 50) can process an original imageto generate a processed image using the HSV space projection techniquesdescribed in FIG. 3B.

According to some embodiments, the system modifies the input image 322in the HSV space, instead of the RGB space. Some benefits of using theHSV can include retaining the structure of the image when the valueattribute is constant. Retaining the structure of the image can improvethe schematic perception of a user viewing the image. The schematicperception of an object can include distinctive features of an objectthat specifies the uniqueness of the object as perceived by a user.

As illustrated in FIG. 3B, a hue-saturation image 324 is generated fromthe input image 322, when the input image 322 is viewed only in thehue-saturation channels. For example, in the hue-saturation image 324,the value attribute for each pixel is removed or otherwise treated asseparate data. Additionally, a value image 326 is generated from theinput image 322, when the input image 322 is viewed only in the value(e.g., brightness) channel. For example, in the value image 324, the hueattribute and the saturation attribute for each pixel is removed orotherwise treated as separate data. As shown in the value image 326, theschematic perception (e.g., details) of the objects in the originalimage 322 are maintained when the value attribute is kept constant.Therefore, by keeping constant the value attribute (i.e., valueattribute in the HSV space) for each pixel in the image, then theschematic perception of the objects in the image can be also maintained.Additionally, the schematic perception of the objects may not be reducedwhen the hue attribute and/or the saturation attribute for one or morepixels in the image are changed. Techniques described herein illustratemethods for reducing distractions in the image by modifying the hueattribute and/or the saturation attribute for one or more pixels of adistractor object in the image, while maintaining the value attribute ofthe pixels of the distractor object constant.

Alternatively, the system can transform the original image 322 to aprocessed image in the lightness-channel a-channel b (LAB) space,instead of the HSV space. When the original image is processed in theLAB space, then the lightness attribute for each pixel of the image canbe kept constant in order to maintain the schematic perception of theobjects in the image. Therefore, the channel-a attribute and/orchannel-b attributes of one or more pixels of the image are modified, bythe computing system, in order to reduce distractions in the originalimage.

FIG. 3C depicts an illustration 350 of inpainting technique in thehue-saturation channels, according to example embodiments of the presentdisclosure. In some implementations, the computing system (usercomputing device 102, server computing device 130, training computingdevice 150, computing device 10, computing device 50) can process anoriginal image to generate a processed image using the inpaintingtechnique described in FIG. 3C.

The original image (e.g., original image 322) can be transformed into anHS image 352 (e.g., HS image with holes). This can be similar to thetechnique described in FIG. 3B when the original image 322 istransformed to a hue-saturation image 324. The HS image 352 and a mask354 can be inputted into the inpainting model 356 to generate aninpainted image 358. The mask 354, which can be similar to the mask 203in FIG. 2 , can be received by the computing system or generated by thecomputing system. In this example, the distractor object, which wasinside the mask 354, has been removed from the inpainted image 358, andthe inpainting model 356 has determined a hue attribute and a saturationattribute for the pixels inside the mask 354 based on the hue attributeand a saturation attribute for the pixels in the HS image 352. FIG. 8illustrates a recolorized image based on the inpainted image 358 of FIG.3C, which illustrates how the distractor objects are blended in bybringing the background colors into the foreground of the image.

FIG. 4 depicts a diagram 400 of determining a palette transform using avoting technique, according to example embodiments of the presentdisclosure. In some implementations, the computing system (usercomputing device 102, server computing device 130, training computingdevice 150, computing device 10, computing device 50) can determine apalette transform using the voting technique described in FIG. 4 .

According to some embodiments, the original image can be transformedinto an original image in HS 410. FIGS. 3A-3C describes techniques fortransforming a raw original image into an original image in the HSchannel. The original image in HS 410 can include a first backgroundregion 412 having pixels (i.e., red pixels) with a first background HSattributes 416, and a second background region 414 having pixels (i.e.,blue pixels) with a second background HS attributes 418. The originalimage in HS can also include a first section of the distractor object420 having pixels (i.e., light green pixel) with a first distractor HSattributes 424, and a second section of the distractor object 422 havingpixels (i.e., dark green pixels) with a second distractor HS attributes426. The distractor object can be inside the dilated mask 428. Thedilated mask can be similar to the dilated mask (e.g., mask 203 with anenlarged region of interest) discussed in FIG. 2 .

One of the benefits of the techniques described herein is that thedistractions can be reduced even when the mask is not accurate. Inconventional systems, it may be complicated to have a precise mask,because the boundaries of the distractor object may be hard todetermine. As a result, the techniques herein can assume that the maskis inaccurate, and still can properly reduce the distraction from theimage.

Subsequently, a masked version of the original image in HS (not shown)is inputted into the inpainting model to generate an inpainted image430. The inpainting model (e.g., inpainting model 208 in FIG. 2 ) canremove the distractor object inside the dilated mask. The inpaintingmodel can transform the masked version of the original image in HS (notshown) into the inpainted image 430. In the inpainted image 430, thepixels of the distractor object (i.e., first section of the distractorobject 420 (light green pixels), second section of the distractor object422 (dark green pixels)) have been modified to be similar to either thepixels of the first background region 432 (i.e., red pixels) or thesecond background region 434 (i.e., blue pixels).

In some instances, the computing system can determine a palettetransform 442 using a voting technique 440. In the example illustratedin diagram 400, each pixel can be recolorized by the color which most ofthe pixels with the same color voted to. The voting can be performed bycounting the colors of the spatially corresponding pixels inside thedilated mask of the original image in HS 410 and the inpainted image430. Additionally, as discussed in FIGS. 3A-C, by maintaining the valueattribute constant, the schematic perception of the distractor objectcan be maintained, which results in the recolorized image being morerealistic.

In this example, pixels of the first section of the distractor objectwith the first distractor HS attributes 444 (i.e., light green pixel)can vote to have a similar HS attributes to the HS attributes of thefirst background region 432 (e.g., red pixels). In this example, thelight green pixel votes to be a red pixel because there is only onelight green pixel in the original image in HS 410, and the light greenpixel is transformed into a red pixel in the inpainted image 430.Therefore, there is one vote for the red pixel and zero votes for bluepixel, which results in the red pixel getting the highest number ofvotes. Based on this voting technique example (i.e., the red pixelgetting the highest number of votes), a first voting classifier can beassigned. The voting classifier can be that the pixels in the firstsection of the distractor object 420 (e.g., any light green pixels) canbe transformed to have an HS attributes that is similar to the firstbackground HS attributes 416 (e.g., transformed to red).

Additionally, pixels of the second section of the distractor object withthe second distractor HS attributes 446 (i.e., dark green pixels) canvote to have similar HS attributes to the HS attributes of the secondbackground region 434 (e.g., blue pixels). In this example, one of thedark green pixels votes to be a red pixel, while two of the dark greenpixels votes to be a blue pixel, based on the transformation of the darkgreen pixels in the inpainted image 430. Therefore, there is one votefor red pixel and two votes for blue pixel, which results in the bluepixel getting the highest number of votes. Based on this votingtechnique example (i.e., the blue pixel getting the highest number ofvotes), a second voting classifier can be assigned. The second votingclassifier can be that the pixels in the second section of thedistractor object 422 (e.g., any dark green pixels) can be transformedto have an HS attributes that is similar to the second background HSattributes 418 (e.g., transformed to blue). Although in the simplifiedexample given in FIG. 4 , all distractor pixels are transformed to adifferent color, in some instances, the first distractor HS attributes424 can equal the first background HS attributes 416. Stateddifferently, it is possible that in some instances a palette transformmay retain certain colors included in the original distractor.

Once the palette transform has been determined, the computing system cantransform the original image in HS 410 to a recolorized image in HS 450using the palette transform 440. In this example, based on the palettetransform 440, the first distractor HS attributes 424 in the originalimage in HS 410 can be transformed to be similar (e.g., equal) to thefirst background HS attributes 416. Additionally, based on the palettetransform 440, the second distractor HS attributes 426 in the originalimage in HS 410 can be transformed to be similar (e.g., equal) to thefirst background HS attributes 418. As a result of this transformation,pixel 452 has been modified into a blue pixel in the recolorized imagein HS 450, whereas the corresponding pixel was red in the inpaintedimage 430.

Example Methods

FIG. 5 depicts a flow chart diagram of an example for reducing adistractor object in a first image, according to example embodiments ofthe present disclosure. Although FIG. 5 depicts steps performed in aparticular order for purposes of illustration and discussion, themethods of the present disclosure are not limited to the particularlyillustrated order or arrangement. The various steps of method 500 can beomitted, rearranged, combined, and/or adapted in various ways withoutdeviating from the scope of the present disclosure.

In some instances, the method 500 can include a computing systemaccessing a raw image prior to step 502. For example, the raw image canbe in a red-green-blue (RGB) color space. Additionally, the computingsystem can process the raw image to generate the first image. Forexample, the first image can be in a hue-saturation-value (HSV) colorspace, a hue-saturation (HS) channels, or other similar chromaticitychannels.

The computing system can be user computing device 102, server computingsystem 130, training computing system 150, computing device 10,computing device 50. The computing system can use one or more processors(e.g., processor(s) 112, 132, 152) to access the raw image, and accessthe mask and the first image at 502.

At 502, the computing system user can access a mask and the first imagehaving the distractor object. The mask can indicate a region of interestin the first image that is associated with the boundaries of thedistractor object. The distractor object can be inside the region ofinterest and can have one or more pixels with an original attribute.

For example, the mask accessed at 502 can be similar to the mask 203 inFIG. 2 , and the first image accessed at 502 can be similar to theoriginal image having a distractor 202 in FIG. 2 . In another example,the mask accessed at 502 can be similar to the mask 354 in FIG. 3B, andthe first image accessed at 502 can be similar to the HS image 352 inFIG. 3B. In yet another example, the dilated mask 428 in FIG. 4 can bedetermined based on the mask accessed at 502, and the original image inHS 410 in FIG. 4 can be to the first image accessed at 502.

In some instances, the mask can be received by the computing system fromthe user input component 122. For example, the region of interest can beinputted by a user on the user device computing device 102. The user canselect (e.g., highlight) one or more distractors in the first image, andrequest the computing system to reduce these selected distractors byharmonizing them with the background of the first image.

In another example, the computing system can determine the mask by usinga segmentation model to determine the boundaries of the distractorobject. As previously mentioned, the mask may be inaccurate (e.g., notproperly define the boundaries of the distractor object), but therecolorized image that is processed at 508 can still be realistic.

As previously mentioned, the first image accessed at 502 can begenerated by processing a raw image. The raw image can be in the RGBcolor space, and the first image can be in the HSV color space. Thefirst image can be generated, from the raw image, in the HS channels ofthe HSV color space by keeping the value (V) attribute of each pixel inthe first image constant. Alternatively, the first image can begenerated, from the raw image, in the AB channels of the LAB color spaceby keeping the luminance (L) attribute of each pixel in the first imageconstant.

In some instances, the original attribute associated with the one ormore pixels of the distractor object in the first image can have anattribute in one or more chromaticity channels. For example, the one ormore chromaticity channels can be a hue-saturation (HS) channels, andthe original attribute of each pixel of the distractor object caninclude a hue attribute and a saturation attribute. Additionally, thevalue attribute of the original image, the inpainted image, and therecolorized image can be kept constant.

Additionally, method 500 can include the computing system processing thefirst image and the mask to generate a masked image prior to step 504.In some instances, after receiving the mask and the first image at 502,the computing system can process the first image and the mask togenerate a masked image. For example, the computing system can use themasking technique 204 described in FIG. 2 to generate the masked image206. As previously described, the masked image (e.g., masked image 206),which can be in the HS channels, can be a lower resolution image thanthe raw image, which can be in the RGB color space. Subsequently, themasked image can be inputted into the machine-learned inpainting modelto generate the inpainted image.

At 504, the computing system can process, using a machine-learnedinpainting model, the first image and the mask to generate an inpaintedimage. The one or more pixels of the distractor object can have aninpainted attribute in one or more chromaticity channels. As previouslymentioned, the one or more chromaticity channels can be thehue-saturation (HS) channels, and the inpainted attribute can be in theHS channels. For example, the inpainted attribute can be a hue attributeand a saturation attribute. Additionally, the value attribute of thefirst image, the inpainted image, and recolorized image can be keptconstant throughout the process described in method 500. For example,when the RGB image is transformed in the HSV color space, the valueattribute can be kept constant. As previously described, by keeping thevalue attribute constant, the schematic perception of an object (e.g.,distinctive features of an object that specifies the uniqueness of theobject as perceived by a user) to be maintained during the processingdescribed in method 500.

For example, the computing system, at step 504, can use the inpaintingmodel 208 described in FIG. 2 to generate the inpainted image 212 basedon the masked image 206. The machine-learned inpainting model 208 can betrained using chromaticity channel training data, such as HS trainingdata 210. Additionally, the machine-learned inpainting model can betrained using hue-saturation-value (HSV) training data or other colorspace training data. Other color space training data can include, but isnot limited, to RGB, hue-saturation-luminance (HSL),cyan-magenta-yellow-key (CMYK), and so on.

At 506, the computing system can determine a palette transform based ona comparison of the first image and the inpainted image. The one or morepixels of the distractor object can have a transform attribute in theone or more chromaticity channels. The transform attribute, which canalso be in the HS channels, can be different from the inpaintedattribute that is obtained at 504. The illustration 400 in FIG. 4describes an example of determining a palette transform (e.g., palettetransform 440) based on a comparison of the first image (e.g., originalimage in HS 410) and the inpainted image (e.g., inpainted image 430).

In some instances, the palette transform determined at 506 is amachine-learned model having a voting classifier. For example, thevoting classifier can assign an HS attribute of a background pixel to apixel associated with the distractor object in the original image asdescribed in illustration 400. The machine-learned model can be based onmajority voting, plurality voting, weighted voting, simple averaging, orweighted averaging. Similarly, the determination of the votingclassifier can be based on majority voting, plurality voting, weightedvoting, simple averaging, or weighted averaging. The example describedin FIG. 4 is an example of a plurality voting method.

For example, the distractor object can include a plurality of pixelswith the original attribute, and the transform attribute of the one ormore pixels of the distractor object can be determined based on aplurality voting technique. Alternatively, the transform attribute canbe determined based on majority voting, weighted voting, simpleaveraging, weighted averaging, and other voting techniques.

In some instances, the palette transform is further determined based ona dilated mask. The dilated mask can have an expanded region of interestassociated with the first image. The expanded region of interest of thedilated mask being larger than the region of interest of the mask. Forexample, the region of interest associated with the mask accessed at 502can be a subsection of the expanded region of interest associated withthe dilated mask. As described in FIG. 2 , the palette transform 216 canbe determined by the voting technique 214 using the inpainted image 212and the dilated mask. As previously mentioned, method 500 can reduce thedistraction while maintaining the realness of the image even with aninaccurate mask. By using a dilated mask, it allows the computing systemto reduce the error associated with an inaccurate mask.

At 508, the computing system can process the first image to generate arecolorized image. The one or more pixels of the distractor object inthe recolorized image can have a recolorized attribute based on thetransform attribute of the determined palette transform. The recolorizedattribute can be different from the inpainted attribute. For example,the recolorized image can be similar to the recolorized image in HS 450described in FIG. 4 . In another example, the recolorized image can bethe recolorized image 220 that is generated when the computing systemapplies the palette transform 218 to the original image 202.

In some instances, method 500 can further access a raw image. The rawimage can be in a red-green-blue (RGB) color space. Additionally, themethod 500 can further include the computing system processing the rawimage to generate the first image. For example, the first image can bein a hue-saturation (HS) channels.

Additionally, the raw image can be a high-resolution image, and thefirst image that is generated by method 500 can be a low-resolutionimage. By having a low-resolution first image, masked image, andinpainted image, the processing time of method 500 can be faster.Additionally, the training of the machine-learning models can also befaster.

Moreover, the recolorized image can be in the HS channels, and themethod 500 can further include processing the recolorized imagegenerated at 508 to generate a final image. The final image can be in ared-green-blue (RGB) color space. Furthermore, the recolorized image canbe a high-resolution image, and the final image is a high-resolutionimage. This is another example of a technical effect where method 500can produce faster processing time without reducing image quality.

FIG. 6 depicts a flow chart diagram of another example for reducing adistractor object in a first image, according to example embodiments ofthe present disclosure. Although FIG. 6 depicts steps performed in aparticular order for purposes of illustration and discussion, themethods of the present disclosure are not limited to the particularlyillustrated order or arrangement. The various steps of method 600 can beomitted, rearranged, combined, and/or adapted in various ways withoutdeviating from the scope of the present disclosure.

At 602, the computing system can access a raw image. The raw image beingin a RGB color space. The raw image can be a high-resolution image. Theraw image can include a distractor object.

At 604, the computing system can process the raw image to generate thefirst image. The first image can be a low-resolution image. Alow-resolution image has a lower dots-per-inch (DPI) number than ahigh-resolution image. In some instances, the DPI low-resolution imagecan be a fraction (e.g., ¼. ½) of the DPI of the high-resolution image.The first image can be in the HS channels. The distractor object canhave one or more pixels having an original hue attribute and an originalsaturation attribute. The first image processed at 604 can be similar tothe first image that is accessed at 502 of method 500.

At 606, the computing system can process the first image and a mask togenerate an inpainted image. The inpainted image can be in the HSchannels. The inpainted image can be a low-resolution image. The one ormore pixels of the distractor object can have an inpainted hue attributeand an inpainted saturation attribute, where the inpainted hue attributecan be different than the original hue attribute and the inpaintedsaturation attribute can be different than the original saturationattribute. The inpainted image generated at 606 can be similar to theinpainted image that is generated at 504 of method 500.

At 608, the computing system can determine a palette transform based ona comparison of the first image and the inpainted image. The palettetransform can modify the inpainted hue attribute and/or the inpaintedsaturation attribute. The palette transform can be determined based onthe techniques described in FIG. 4 . Additionally, the palette transformdetermined at 608 can be similar to the palette transform determined at506 of method 500.

At 610, the computing system can process, by applying the palettetransform determined at 608, the first image to generate a recolorizedimage. The recolorized image can be in the HS channels. The one or morepixels of the distractor object can have a recolorized hue attribute andrecolorized saturation attribute, where the recolorized hue attributecan be different than the inpainted hue attribute and the recolorizedsaturation attribute can be different than the inpainted saturationattribute. The recolorized image can be a high-resolution image. Therecolorized image generated at 610 can be similar to the recolorizedimage generated at 508 of method 500.

At 612, the computing system can process the recolorized image togenerate a final image. The final image can be in the RGB color space.The final image can be a high-resolution image.

FIG. 7 depicts an illustration 700 of transforming an original imageinto an inpainted image and a recolorized image according to exampleembodiments of the present disclosure. Conventional techniques may notbe able to properly inpaint the distractor 715 from in the originalimage 710, as shown in the inpainted image 720. In the inpainted image720, the distractor 715, which is a colorful ball, has become aninpainted object 725. As shown in the inpainted image 720, removing adistractor can result in the inpainted image 720 looking less realistic,as evident by shadows 725 still being present in the inpainted object720. The inpainted image 720 illustrates an example of how removing adistractor object 715 from an original image 710 can be technicallycomplicated. For example, by removing the distractor 715 from theoriginal image 710, it can be difficult to determine what is happeningbehind the distractor, difficult to fill edges near the distractor, andremoving shadows of the distractor. Instead of removing the distractorobject 715, using techniques described herein, the original image 710can be processed into a recolorized image 730 with the distractor object735 being blended-in by adapting hues and saturations from thebackground of the original image 710.

FIG. 8 depicts another illustration 800 of transforming an originalimage into a recolorized image according to example embodiments of thepresent disclosure. In the example illustration 800, the original image810 is transformed into the recolorized image 820. In the recolorizedimage 820, the first distractor object 830, the second distractor object840, and the third distractor object 850 are modified to blend with thebackground of the original image 810. As a result, the recolorized image820 maintains the realism of the original image 810 but has reduced thedistraction associated with the distractor objects 830-850. Aspreviously described in FIG. 3C, the recolorized image 820 in FIG. 8 canbe generated based at least on the inpainted image 368 of FIG. 3C.

FIG. 9 depicts another illustration of transforming an original imageinto a recolorized image according to example embodiments of the presentdisclosure. In this example illustration 900, the distractor object 950in the original image 910 can be modified to a recolorized object 960 inorder to reduce the distraction in recolorized image 920. Additionally,as illustrated in the zoomed in version of the original image 930, thedistractor object 950 can be properly modified as a recolorized object960 regardless of the accuracy of the mask. As illustrated in thisexample, the mask, which can be inputted by a user or determined by asegmentation model, can be inaccurate. The mask can define theboundaries of the distractor object. In conventional systems, when themask is inaccurate, the final image after the processing may not lookrealistic because the boundaries of the distractor object areinaccurate, and therefore the removal of the distractor object causesthe final image to look unrealistic. In this example illustration, therecolorized object 960 blends in with the background, which results inthe recolorized image 940 to look more realistic.

Additional Disclosure

The technology discussed herein refers to servers, databases, softwareapplications, and other computer-based systems, as well as actionstaken, and information sent to and from such systems. The inherentflexibility of computer-based systems allows for a great variety ofpossible configurations, combinations, and divisions of tasks andfunctionality between and among components. For instance, processesdiscussed herein can be implemented using a single device or componentor multiple devices or components working in combination. Databases andapplications can be implemented on a single system or distributed acrossmultiple systems. Distributed components can operate sequentially or inparallel.

While the present subject matter has been described in detail withrespect to various specific example embodiments thereof, each example isprovided by way of explanation, not limitation of the disclosure. Thoseskilled in the art, upon attaining an understanding of the foregoing,can readily produce alterations to, variations of, and equivalents tosuch embodiments. Accordingly, the subject disclosure does not precludeinclusion of such modifications, variations and/or additions to thepresent subject matter as would be readily apparent to one of ordinaryskill in the art. For instance, features illustrated or described aspart of one embodiment can be used with another embodiment to yield astill further embodiment. Thus, it is intended that the presentdisclosure covers such alterations, variations, and equivalents.

1.-20. (canceled)
 21. A computer-implemented method for reducing adistractor object in an image, the method comprising: accessing theimage and a mask, the image being in a red-green-blue (RGB) color space,wherein the mask indicates a region of interest associated with theimage, and wherein a distractor object is inside the region of interestand has a first pixel with a first RGB value; processing, using amachine-learned inpainting model, the image and the mask to generate aninpainted image, wherein the first pixel of the distractor object has afirst inpainted attribute value in one or more chromaticity channels;modifying, using a voting technique, the first pixel of the distractorobject to a second inpainted attribute value in the one or morechromaticity channels, the second inpainted attribute value beingdifferent than the first inpainted attribute value; and processing theimage to generate a final image in the RGB color space, wherein thefirst pixel of the distractor object has a second RGB value that isdifferent than the first RGB value, the second RGB value being based onthe second inpainted attribute value.
 22. The computer-implementedmethod of claim 21, wherein the image is a raw image, furthercomprising: processing the raw image to generate a first image, whereinthe first image is a hue and saturation (HS) channel.
 23. Thecomputer-implemented method of claim 22, further comprising: processingthe first image and the mask to generate a masked image; and wherein themasked image is inputted into the machine-learned inpainting model togenerate the inpainted image.
 24. The computer-implemented method ofclaim 22, further comprising: determining a palette transform based acomparison of the first image and the inpainted image, wherein thepalette transform is generated using a plurality voting technique. 25.The computer-implemented method of claim 24, wherein the palettetransform is determined based on a dilated mask, the dilated mask havingan expanded region of interest associated with the first image, theexpanded region of interest of the dilated mask being larger than theregion of interest of the mask.
 26. The computer-implemented method ofclaim 22, wherein the raw image is a high-resolution image, and thefirst image is a low-resolution image.
 27. The computer-implementedmethod of claim 21, wherein the final image is a high-resolution image,and the inpainted image is low-resolution image.
 28. Thecomputer-implemented method of claim 21, wherein the one or morechromaticity channels comprise hue and saturation (HS) channels.
 29. Thecomputer-implemented method of claim 21, wherein the machine-learnedinpainting model is trained using hue and saturation (HS) training data.30. The computer-implemented method of claim 21, wherein the distractorobject blends into a background of the final image.
 31. A computingsystem, comprising: one or more processors; and one or morenon-transitory computer-readable media that collectively store: amachine-learned inpainting model, wherein the machine-learned inpaintingmodel is configured to generate an inpainted image using an image; andinstructions that, when executed by the one or more processors, causethe computing system to perform operations, the operations comprising:accessing the image and a mask, the image being in a red-green-blue(RGB) color space, wherein the mask indicates a region of interestassociated with the image, and wherein a distractor object is inside theregion of interest and has a first pixel with a first RGB value;processing, using the machine-learned inpainting model, the image andthe mask to generate an inpainted image, wherein the first pixel of thedistractor object has a first inpainted attribute value in one or morechromaticity channels; modifying, using a voting technique, the firstpixel of the distractor object to a second inpainted attribute value inthe one or more chromaticity channels, the second inpainted attributevalue being different than the first inpainted attribute value; andprocessing the image to generate a final image in the RGB color space,wherein the first pixel of the distractor object has a second RGB valuethat is different than the first RGB value, the second RGB value beingbased on the second inpainted attribute value.
 32. The computer systemof claim 31, wherein the image is a raw image, the operation furthercomprising: processing the raw image to generate a first image, whereinthe first image is a hue and saturation (HS) channel.
 33. The computersystem of claim 32, the operation further comprising: processing thefirst image and the mask to generate a masked image; and wherein themasked image is inputted into the machine-learned inpainting model togenerate the inpainted image.
 34. The computer system of claim 32, theoperation further comprising: determining a palette transform based acomparison of the first image and the inpainted image, wherein thepalette transform is generated using a plurality voting technique. 35.The computer system of claim 34, wherein the palette transform isdetermined based on a dilated mask, the dilated mask having an expandedregion of interest associated with the first image, the expanded regionof interest of the dilated mask being larger than the region of interestof the mask.
 36. The computer system of claim 32, wherein the raw imageis a high-resolution image, and the first image is a low-resolutionimage.
 37. The computer system of claim 31, wherein the final image is ahigh-resolution image, and the inpainted image is low-resolution image.38. The computer system of claim 31, wherein the one or morechromaticity channels comprise hue and saturation (HS) channels.
 39. Thecomputer system of claim 31, wherein the machine-learned inpaintingmodel is trained using hue and saturation (HS) training data.
 40. One ormore non-transitory, computer readable media storing instructions thatare executable by one or more processors to cause a computing system toperform operations, the operations comprising: accessing an image and amask, the image being in a red-green-blue (RGB) color space, wherein themask indicates a region of interest associated with the image, andwherein a distractor object is inside the region of interest and has afirst pixel with a first RGB value; processing, using a machine-learnedinpainting model, the image and the mask to generate an inpainted image,wherein the first pixel of the distractor object has a first inpaintedattribute value in one or more chromaticity channels; modifying, using avoting technique, the first pixel of the distractor object to a secondinpainted attribute value in the one or more chromaticity channels, thesecond inpainted attribute value being different than the firstinpainted attribute value; and processing the image to generate a finalimage in the RGB color space, wherein the first pixel of the distractorobject has a second RGB value that is different than the first RGBvalue, the second RGB value being based on the second inpaintedattribute value.